import java.io.PrintWriter;
import java.net.Socket;
import java.util.Scanner;

public class ClientSocket {

	public static void main(String[] args) throws Exception {

		Socket socket = new Socket("127.0.0.1", 9999);
		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {

			PrintWriter ps = new PrintWriter(socket.getOutputStream());
			String content = sc.nextLine();
			ps.println(content);
			ps.flush();
			ps.close();
		}
	}

}
